/**
 * Created by Blink on 2017/8/18.
 * demo table
 */

import React from 'react';
import {ScrollView, StyleSheet, View} from 'react-native';

export default class extends React.Component {
    render() {
        const {data} = this.props;

        let eles = [];
        let key = 0;
        for (let v of data) {
            eles.push(
                <View style={_css.row} key={key++}>
                    {v}
                </View>);
        }

        return (
            <ScrollView style={_css.view}>
                {eles}
            </ScrollView>
        )
    }
}

const _css = StyleSheet.create({
    view: {
        flex: 1
    },

    row: {
        borderBottomWidth: 1,
        borderBottomColor: '#555',
        padding: 12
    }
});